package service.impl;

import dao.QuestionDao;
import dao.impl.QuestionDaoImpl;
import domain.Question;
import service.QuestionService;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public class QuestionServiceImpl implements QuestionService {
    private QuestionDao dao=new QuestionDaoImpl();
    @Override
    public boolean addQuestion(Question question) throws Exception {
        return dao.addQuestion(question);
    }

    @Override
    public List<Question> queryByPage(HttpServletRequest request) throws Exception {
        return dao.queryByPage(request);
    }

    @Override
    public int queryTotalCount(HttpServletRequest request) throws Exception {
        return dao.queryTotalCount(request);
    }


    @Override
    public boolean deleteQuestion(int questionId) throws Exception {
        return dao.deleteQuestion(questionId);
    }
}
